<div class="admin-form">
  <%= error_messages_for 'laiv' %>
  <fieldset>
    <legend>Laiv details</legend>

    <% form_for @laiv do |form| %>

      <p><label for="laiv_title">Title:</label>
      <%=form.text_field :title, :size => 40%></p>

      <p><label for="laiv_subtitle">Subtitle:</label>
      <%=form.text_field :subtitle, :size => 40%></p>

      <p><label for="laiv_organizer">Organizer:</label>
      <%=form.text_field :organizer, :size => 40%></p>

      <p><label for="laiv_description">Description:</label>
      <%=form.text_area :description, :cols => 40, :rows => 7%></p>

      <p><label for="laiv_starts_on">Starts on:</label>
      <%=form.date_select :starts_on, :order => [:day, :month, :year] %></p>

      <p><label for="laiv_ends_on">Ends on:</label>
      <%=form.date_select :ends_on, :order => [:day, :month, :year] %></p>

      <p><label for="laiv_registration_starts_on">Registration starts on:</label>
      <%=form.datetime_select :registration_starts_on, :order => [:day, :month, :year] %></p>

      <p><label for="laiv_registration_ends_on">Registration ends on:</label>
      <%=form.datetime_select :registration_ends_on, :order => [:day, :month, :year] %></p>

      <p><label for="laiv_public">Go public?</label>
      <%=form.check_box :public %> Show laiv in list of laivs</p>

      <p><label for="laiv_administrator_id">Administrator</label>
      <%=form.select :administrator_id, User.find(:all).collect{|u| [u.name, u.id]}%></p>

      <%=submit_tag%>
    <% end %>
  </fieldset>
</div>
